Optimal. Leaf size=159 \[ \frac {\sqrt {2} (A-B) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 (5 A-B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{15 a d}-\frac {4 (5 A-7 B) \tan (c+d x)}{15 d \sqrt {a \sec (c+d x)+a}}+\frac {2 B \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.42, antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {4021, 4010, 4001, 3795, 203} \[ \frac {\sqrt {2} (A-B) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 (5 A-B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{15 a d}-\frac {4 (5 A-7 B) \tan (c+d x)}{15 d \sqrt {a \sec (c+d x)+a}}+\frac {2 B \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 3795
Rule 4001
Rule 4010
Rule 4021
Rubi steps
\begin {align*} \int \frac {\sec ^3(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx &=\frac {2 B \sec ^2(c+d x) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {2 \int \frac {\sec ^2(c+d x) \left (2 a B+\frac {1}{2} a (5 A-B) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{5 a}\\ &=\frac {2 B \sec ^2(c+d x) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (5 A-B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 a d}+\frac {4 \int \frac {\sec (c+d x) \left (\frac {1}{4} a^2 (5 A-B)-\frac {1}{2} a^2 (5 A-7 B) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{15 a^2}\\ &=-\frac {4 (5 A-7 B) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 B \sec ^2(c+d x) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (5 A-B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 a d}+(A-B) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx\\ &=-\frac {4 (5 A-7 B) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 B \sec ^2(c+d x) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (5 A-B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 a d}-\frac {(2 (A-B)) \operatorname {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {\sqrt {2} (A-B) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}-\frac {4 (5 A-7 B) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 B \sec ^2(c+d x) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (5 A-B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.41, size = 123, normalized size = 0.77 \[ \frac {\tan (c+d x) \left (2 \sqrt {1-\sec (c+d x)} \left ((5 A-B) \sec (c+d x)-5 A+3 B \sec ^2(c+d x)+13 B\right )+15 \sqrt {2} (A-B) \tanh ^{-1}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right )\right )}{15 d \sqrt {1-\sec (c+d x)} \sqrt {a (\sec (c+d x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 397, normalized size = 2.50 \[ \left [-\frac {15 \, \sqrt {2} {\left ({\left (A - B\right )} a \cos \left (d x + c\right )^{3} + {\left (A - B\right )} a \cos \left (d x + c\right )^{2}\right )} \sqrt {-\frac {1}{a}} \log \left (\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, \cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 4 \, {\left ({\left (5 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{2} - {\left (5 \, A - B\right )} \cos \left (d x + c\right ) - 3 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{30 \, {\left (a d \cos \left (d x + c\right )^{3} + a d \cos \left (d x + c\right )^{2}\right )}}, -\frac {2 \, {\left ({\left (5 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{2} - {\left (5 \, A - B\right )} \cos \left (d x + c\right ) - 3 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) + \frac {15 \, \sqrt {2} {\left ({\left (A - B\right )} a \cos \left (d x + c\right )^{3} + {\left (A - B\right )} a \cos \left (d x + c\right )^{2}\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a}}}{15 \, {\left (a d \cos \left (d x + c\right )^{3} + a d \cos \left (d x + c\right )^{2}\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.68, size = 271, normalized size = 1.70 \[ \frac {\frac {15 \, {\left (\sqrt {2} A - \sqrt {2} B\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} - \frac {2 \, {\left ({\left (10 \, \sqrt {2} A a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - 20 \, \sqrt {2} B a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - {\left (10 \, \sqrt {2} A a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - 17 \, \sqrt {2} B a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {15 \, \sqrt {2} B a^{2}}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{15 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.70, size = 595, normalized size = 3.74 \[ \frac {\left (15 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )-15 B \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+30 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right ) \cos \left (d x +c \right )-30 B \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right ) \cos \left (d x +c \right )+15 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right )-15 B \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right )+40 A \left (\cos ^{3}\left (d x +c \right )\right )-104 B \left (\cos ^{3}\left (d x +c \right )\right )-80 A \left (\cos ^{2}\left (d x +c \right )\right )+112 B \left (\cos ^{2}\left (d x +c \right )\right )+40 A \cos \left (d x +c \right )-32 B \cos \left (d x +c \right )+24 B \right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{60 d \cos \left (d x +c \right )^{2} \sin \left (d x +c \right ) a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \sec \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{3}}{\sqrt {a \sec \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^3\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \sec {\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________